package com.gettingstarted.gds.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Required;

import com.gettingstarted.gds.dao.*;
import com.gettingstarted.gds.model.Contact;
import com.gettingstarted.gds.service.*;

public class ContactManagerImpl implements ContactManager {

	private ContactDao dao;

	@Required
	public void setContactDao(ContactDao dao) {
		this.dao = dao;
	}

	@Override
	public List<Contact> getContacts() {
		return dao.getContacts();
	}

	@Override
	public void removeContact(Contact contact) {
		dao.removeContact(contact);
	}

	@Override
	public Contact saveContact(Contact contact) {
		return dao.saveContact(contact);
	}

	@Override
	public Contact updateContact(Contact contact) {
		return dao.update(contact);
	}

}
